<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>添加新的文章信息</title>
<link href="html/css/css.css" rel="stylesheet" type="text/css" />
<script Language="JavaScript" src="html/js/functions.js"></script>
<script Language="JavaScript" src="html/js/ajax.js"></script>
<script language="javascript">

//提交验证
function check_submit()
{

		if($('Title').value =='')
		{
			msg_box('您还没有填写标题哦!');
			$('Title').focus();
			return false;
		}

		
		if($('CategoryID').value =='-1')
		{
			msg_box('您还没有选择分类!');
			//$('categoryid').focus();
			return false;
		}

		
		$('submit').disabled = true;
		$('submit').src = 'html/images/ajax.gif';
		return true;
}

function checkImg()
{
	if($('img_check').checked == true)
	{
		$('img_area').innerHTML = '<input name="Photo" type="text" class="txt" id="Photo" />';
		$('img_text').style.color = '#f00';
		
	}
	else
	{
		$('img_area').innerHTML = '<input name="Photo" type="file" class="txt" id="Photo" />';
		$('img_text').style.color = '#ccc';
	}
}

function checkToUrl()
{
	if($('_check').checked == true)
	{
		$('tourl').style.display = 'inline';
		$('tourl_text').style.color = '#f00';
		
	}
	else
	{
		$('tourl').style.display = 'none';
		$('tourl_text').style.color = '#ccc';
	}
}
</script>
</head>

<body>

<if $Msg>
<div id="msg"><img src="html/images/information.gif" width="16" height="16" align="absmiddle" />[$Msg]</div>
</if>

<form action="" method="post" enctype="multipart/form-data" name="form" id="form" style="margin:0px" onsubmit="return check_submit();">
<div class="form_box">
	<div class="header">
    <img src="html/images/script_add.gif" width="16" height="16" align="absmiddle" />&nbsp;添加新的文章信息</div>
  <div class="box">
    	<div class="text">
    	标题:
<span id="tourl_text" style="color:#ccc;">跳转:<input name="_check" id="tourl_check" type="checkbox" value="true" onclick="checkToUrl();" /></span>
    	</div>
        <div class="input">
    		<input name="Title" type="text" id="Title" />
       	</div>
        <div style="clear:both"></div>
    </div>
    
    <div class="box" id="tourl">
    	<div class="text" style="color:#f00;">
    	<strong>跳转地址:</strong>
    	</div>
        <div class="input"><input name="ToURL" type="text" id="ToURL" />
       	</div>
        <div style="clear:both"></div>
    </div>
    
      <div class="box">
    	<div class="text">
    	副标题:
    	</div>
        <div class="input">
    		<input name="SubTitle" type="text" id="SubTitle" />
       	</div>
        <div style="clear:both"></div>
    </div>
    
    <div class="box">
    	<div class="text">
    	缩略图:<span id="img_text" style="color:#ccc;">网络地址:<input name="img_check" id="img_check" type="checkbox" value="true" onclick="checkImg();" /></span>
    	</div>
        <div class="input">
    		<span id="img_area"><input name="Photo" type="file" id="Photo"  /></span>
       	</div>
        <div style="clear:both"></div>
    </div>
    
    
    	<div class="box">
    	<div class="text">
    	连接颜色:
    	</div>
        <div class="input">
    		<input name="Color" type="text" id="colorPicker" /><script Language="JavaScript" src="html/js/colorPicker.js"></script>
       	</div>
        <div style="clear:both"></div>
    </div>
    
	 <div class="box">
    	<div class="text">
    	所属分类:
    	</div>
        <div class="input">
    	<if $CategoryForSelect>
    		<select name="CategoryID" id="CategoryID">
            <option value="-1">请选择分类</option>
            [$CategoryForSelect]
          </select>
           <else>
           <input name="CategoryID" type="hidden" value="-1"  />
          <a href="index.php?c=category&d=showDate&url=[@base64_encode('index.php?c=category&d=add')]"><font color="#FF0000"><strong>暂无分类，不能添加数据，点击这里添加新的分类</strong></font></a>          
          </if>  
       	</div>
        <div style="clear:both"></div>
    </div>
    

    <div class="box">
    	<div class="text">
    	信息内容:<br /><br />

删除连接：<input type="checkbox" name="Dellink" value="1"/>

    	</div>
        <div class="input">
    		      <input type="hidden" id="Content" name="Content" style="display:none" value=""/>
                  <input type="hidden" id="Content___Config" value="" style="display:none" />                 
                   <iframe id="Content___Frame" src="editor/fck/editor/fckeditor.html?InstanceName=Content&amp;Toolbar=Default" width="80%" height="250" frameborder="no" scrolling="no"></iframe>
       	</div>
        <div style="clear:both"></div>
    </div>


      <div class="box">
    	<div class="text">
    	新闻摘要:
    	</div>
        <div class="input">
    		<textarea name="Intro" style="height:100px;"></textarea>
       	</div>
        <div style="clear:both"></div>
    </div>
    
    
    <div class="box">
    	<div class="text">
    	审核状态:
    	</div>
        <div class="input">
    		<select name="State">
            <option value="1" selected="selected">已审核</option>
            <option value="-1">未审核</option>
            </select>
       	</div>
        <div style="clear:both"></div>
    </div>
    <div class="box">
    	<div class="text">
    	加粗显示:
    	</div>
        <div class="input">
    		<select name="b">
            <option value="1">是</option>
            <option value="-1" selected="selected">否</option>
            </select>
       	</div>
        <div style="clear:both"></div>
    </div>
    
    <div class="box">
    	<div class="text">
    	推荐显示:
    	</div>
        <div class="input">
    		<select name="Recommend">
            <option value="1">是</option>
            <option value="-1" selected="selected">否</option>
            </select>
       	</div>
        <div style="clear:both"></div>
    </div>
    
        <div class="box">
    	<div class="text">
    	开放评论:
    	</div>
        <div class="input">
    		<select name="IsComment">
            <option value="1" selected="selected">是</option>
            <option value="-1" selected="selected">否</option>
            </select>
       	</div>
        <div style="clear:both"></div>
    </div>
    
    <div class="box">
    	<div class="text">
    	标签(空格隔开):
    	</div>
        <div class="input">
    		<input name="Tags" type="text" id="Tags"/>
       	</div>
        <div style="clear:both"></div>
    </div>
    
    <div class="box">
    	<div class="text">
    	作者:
    	</div>
        <div class="input">
    		<input name="Author" type="text" id="Author"/>
       	</div>
        <div style="clear:both"></div>
    </div>
    
	<div class="box">
    	<div class="text">
    	来源:
    	</div>
        <div class="input">
    		<input name="Befrom" type="text" id="Befrom"/>
       	</div>
        <div style="clear:both"></div>
    </div>
    
    
        <div class="box">
    	<div class="text">
    	自定义标识::
    	</div>
        <div class="input">
    		<input name="Mark" type="text" id="Mark"/>
            <br><img src="html/images/information.gif" width="16" height="16" align="absmiddle" /> 用于扩展调用
       	</div>
        <div style="clear:both"></div>
    </div>
    
    <div class="box">
    	<div class="text">
    	排序:
    	</div>
        <div class="input">
    		<input name="Top" type="text" id="Top"  />
            <br><img src="html/images/information.gif" width="16" height="16" align="absmiddle" /> 数字越大越靠前
       	</div>
        <div style="clear:both"></div>
    </div>
    
    
    <div class="box">
    	<div class="text">
    	点击数:
    	</div>
        <div class="input">
    		<input name="Hits" type="text" id="Hits"  />
       	</div>
        <div style="clear:both"></div>
    </div>
    
    </div>
</div>
<div class="form_box_bottom">
<input type="image" src="html/images/submit.gif" align="absmiddle" border="0" title="保存" id="submit" /></a>
<a href="javascript:history.go(-1);"><img src="html/images/msg_cancel.gif" align="absmiddle" border="0" title="返回上一页" /></a>
</div>
</form>
<script language="javascript">
$('tourl').style.display = 'none';
</script>
</body>
</html>
